import { Routes, Route } from 'react-router-dom'
import React from 'react'

import routes from "./routes"
// import {Routes, Route, Navigate} from "react-router-dom"

// import Main from "./components/Main"
// import Login from "./components/Login"
// import NotFound from "./components/404"
// import About from "./components/Main/About"
// import Home from "./components/Main/Home"

export default function App() {
  return (
  <div className="outer">
    <Routes>
      {
        routes.map(item => {
          return <Route path={item.path} element={item.element} key={item.path}></Route>
        })
      }


    </Routes>
    {/* <Routes>
      <Route path='/login' element={<Login />}></Route>
      <Route path='/main' element={<Main />}>
        <Route path="/main/home" element={<Home />}></Route>
        <Route path="/main/about" element={<About />}></Route>
      </Route>
      <Route path='*' element={<NotFound />}></Route>
      <Route path='/' element={<Navigate to="/login" />}></Route>
    </Routes> */}
  </div>
  )
}
